package org.liveboardgames.agricola.control.delegates
{
    import com.adobe.cairngorm.business.ServiceLocator;
    
    import mx.rpc.IResponder;
    
    import org.liveboardgames.agricola.model.AgricolaModelLocator;
    import org.liveboardgames.agricola.model.enums.ResourceTypeEnum;
    import org.liveboardgames.agricola.vo.Game;
    import org.liveboardgames.agricola.vo.card.Card;
    import org.liveboardgames.agricola.vo.card.Oven;
    import org.liveboardgames.agricola.vo.player.Player;
    
    public class ResetHarvestDelegate
    {
        private var _responder:IResponder;
        
        private var _service:Object;
        
        public function ResetHarvestDelegate(responder:IResponder)
        {
            this._service = ServiceLocator.getInstance().getRemoteObject("harvestService");
			this._responder = responder;
        }
        
        public function resetHarvest(game:Game):void
        {
        	var call:Object = _service.resetHarvest(game.id);
			call.resultHandler = _responder.result;
			call.faultHandler = _responder.fault;
        }
    }
}